#include "data/version.hpp"
#include <fmt/format.h>
#include "fmt/core.h"

u64 Version::code() const
{
    return (uint64_t)major * 0x1000000000000 +
           (uint64_t)minor * 0x10000000000 +
           (uint64_t)patch * 0x100000000 +
           (uint64_t)build_number;
}

std::string Version::str() const
{
    return fmt::format("{}.{}.{}.{}", major, minor, patch, build_number);
}

std::string Version::info() const
{
    return fmt::format("Version: {}.{}.{}, Build: {}", major, minor, patch, build_number);
}
